package serviceimpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import mapper.PersonMapper;
import po.Person;
import serivce.personService;

@Service
public class personServiceimpl implements personService {
	
	
	@Autowired
	private PersonMapper personmapper;
	
	public List<Person> queryAll() {
		
		return personmapper.queryAll();
	}

	public Person queryById(Integer id) {
		
		return personmapper.queryById(id);
	}

	@Transactional
	public void insertPerson(Person person) {
		
		personmapper.insertPerson(person);
	}

}
